package com.imelite.qyh.repository;


import com.imelite.qyh.base.ApplicationContextHelper;
import com.imelite.qyh.base.result.ResultBean;
import com.imelite.qyh.model.Wechat;
import com.imelite.qyh.service.WechatService;

public class WechatRepository {
    WechatService wechatService= (WechatService) ApplicationContextHelper.getBean("wechatService");

    private static WechatRepository instance = null;
    public static synchronized WechatRepository getInstance() {
        if (instance == null) {
            instance = new WechatRepository();
        }
        return instance;
    }

    public Wechat selectByPrimaryKey(String id){
        Wechat wechat=wechatService.selectByPrimaryKey(id);
        if(wechat==null){
            wechat=new Wechat();
        }
        return wechat;
    }

    public ResultBean updateByPrimaryKeySelective(Wechat record){
        return wechatService.updateByPrimaryKeySelective(record);
    }
}
